/*    */ package cn.zzuisa.news.filter;

/*    */
/*    */ import java.io.IOException;
/*    */ import javax.servlet.Filter;
/*    */ import javax.servlet.FilterChain;
/*    */ import javax.servlet.FilterConfig;
/*    */ import javax.servlet.ServletException;
/*    */ import javax.servlet.ServletRequest;
/*    */ import javax.servlet.ServletResponse;

/*    */
/*    */
/*    */
/*    */
/*    */
/*    */
/*    */
/*    */
/*    */
/*    */
/*    */
/*    */
/*    */
/*    */ public class CommonFilter/*    */ implements Filter
/*    */ {
	/* 26 */ private String encoding = null;

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/* 32 */ public void init(FilterConfig filterConfig) throws ServletException {
		this.encoding = filterConfig.getInitParameter("encoding");
	}

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/*    */ public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain)
			throws IOException, ServletException {
		/* 40 */ request.setCharacterEncoding(this.encoding);
		/*    */
		/* 42 */ response.setContentType("text/html;charset=" + this.encoding);
		/*    */
		/* 44 */ filterChain.doFilter(request, response);
		/*    */ }

	/*    */
	/*    */
	/*    */
	/*    */
	/*    */
	/* 51 */ public void destroy() {
		this.encoding = null;
	}
	/*    */ }

/*
 * Location: /Users/frank/Desktop/admin/WEB-INF/classes/!/cn/zzuisa/news/filter/
 * CommonFilter.class Java compiler version: 8 (52.0) JD-Core Version: 1.0.7
 */